package br.edu.ufc.deti.broker.services;

public class ExecucaoProxy implements br.edu.ufc.deti.broker.services.Execucao {
  private String _endpoint = null;
  private br.edu.ufc.deti.broker.services.Execucao execucao = null;
  
  public ExecucaoProxy() {
    _initExecucaoProxy();
  }
  
  public ExecucaoProxy(String endpoint) {
    _endpoint = endpoint;
    _initExecucaoProxy();
  }
  
  private void _initExecucaoProxy() {
    try {
      execucao = (new br.edu.ufc.deti.broker.services.ExecucaoServiceLocator()).getExecucao();
      if (execucao != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)execucao)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)execucao)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (execucao != null)
      ((javax.xml.rpc.Stub)execucao)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public br.edu.ufc.deti.broker.services.Execucao getExecucao() {
    if (execucao == null)
      _initExecucaoProxy();
    return execucao;
  }
  
  public java.lang.String executaAplicacao_Recurso(java.lang.String xmlRecebido) throws java.rmi.RemoteException{
    if (execucao == null)
      _initExecucaoProxy();
    return execucao.executaAplicacao_Recurso(xmlRecebido);
  }
  
  public java.lang.String executaAplicacao_Recursos(java.lang.String xmlRecebido) throws java.rmi.RemoteException{
    if (execucao == null)
      _initExecucaoProxy();
    return execucao.executaAplicacao_Recursos(xmlRecebido);
  }
  
  
}